/*
 * This file is part of ksPlatform
 * 
 * Copyright (c) 2014-2015
 * 
 * This file is dual-licensed under the AGPLv3 (http://www.gnu.org/licenses/agpl-3.0.html) 
 * 
 * If you are unsure which license is appropriate for your use, please contact the sales department
 * at 97041437@qq.com.
 */

package cn.com.ksplatform.modules.system.auth.buttonmanager.model;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OrderBy;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonIgnore;

import cn.com.ksplatform.base.BaseModel;
import cn.com.ksplatform.modules.system.auth.menumanager.model.PlatMenu;

/**
 * @ClassName:PlatButtonGroup <br/>
 * @deprecated:TODO. <br/>
 * @Date: 2015年5月21日 下午5:10:17 <br/>
 * 
 * @author Mr.Luoxing
 * @version 1.0
 */
@Entity
@Table(name = "t_sys_button_group")
public class PlatButtonGroup extends BaseModel{
	@Id
	/*@GenericGenerator(name = "systemUUID", strategy = "uuid")
	@GeneratedValue(generator = "systemUUID")*/
	@Column(name = "btnGId")
	private String btnGId;
	private String btnGName;

	@ManyToOne(fetch = FetchType.LAZY)
	@JsonIgnore
	@JoinColumn(name = "menuId")
	private PlatMenu menu;
	
	@OneToMany(mappedBy = "btnGroup")
	@OrderBy("btnId")
	@JsonIgnore
	private Set<PlatButton> btns = new HashSet<PlatButton>(0);

	
	public String getBtnGId() {
		return btnGId;
	}

	public void setBtnGId(String btnGId) {
		this.btnGId = btnGId;
	}

	public String getBtnGName() {
		return btnGName;
	}

	public void setBtnGName(String btnGName) {
		this.btnGName = btnGName;
	}

	public Set<PlatButton> getBtns() {
		return btns;
	}

	public void setBtns(Set<PlatButton> btns) {
		this.btns = btns;
	}

	public PlatMenu getMenu() {
		return menu;
	}

	public void setMenu(PlatMenu menu) {
		this.menu = menu;
	}

}
